<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="ISO-8859-1"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="${pageContext.servletContext.contextPath}/styles/default.css" />
<title>Insert title here</title>
</head>
<body>
	<h1>Your Basket</h1>
	<table>
		<thead>
			<tr>
				<th>flight</th>
				<th>departure</th>
				<th>destination</th>
				<th>departuretime</th>
				<th>price</th>
				<th>Remove</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${myFlights}" var="flight">
				<tr>
					<td>${flight.flightCode}</td>
					<td>${flight.line.departure.name}</td>
					<td>${flight.line.destination.name}</td>
					<td>${flight.departureTime}</td>
					<td>${flight.price}</td>
					<c:url value="/bookings" var="removeFlightUrl">
						<c:param name="flight" value="${flight.flightId}" />
					</c:url>
					<td><a href="${removeFlightUrl}" class=".remove">remove</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<c:url value="/bookings?searchForm" var="searchUrl" />
	<a href="${searchUrl}">search new flight</a>
</body>
</html>